import java.util.Arrays;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-09-01
 * Time:9:20
 */
public class Test {
    public static void main(String[] args) {
        int[] arr=new int[]{1,2,3,4,5};
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
        for (int x:arr) {
            System.out.println(x);
        }
        System.out.println(Arrays.toString(arr));
//        int[] arr1;//动态存储
//        // arr=new int[4];
//        int[] arr2;//静态存储
//        //arr=new int[]{1,2,3,4};
//        arr{2,3,4,5};
    }

}
